<template>
  <div class="top">
    <p @click="changeflagTap" v-if="flagTap">编辑</p>
    <p @click="changeflagTap" v-else>完成</p>
    <p>购物车</p>
    <p @click="filteriSshow">筛选</p>
  </div>
</template>

<script>
export default {
  props: { flagTap: Boolean },
  setup(props, context) {
    function filteriSshow() {
      context.emit("isShowFlag");
    }
    return {
      filteriSshow,
    };
  },
  methods: {
    changeflagTap() {
      console.log(1);
      this.$emit("changeflag");
    },
  },
};
</script>

<style lang="scss" scoped>
.top {
  width: 100%;
  height: 40px;
  background-color: rgb(240, 33, 33);
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: #fff;
}
</style>
